var status = -1;
var selectionLog = [];

function action(e, d, c) {
    if (status == 0 && e == 0) {
        cm.dispose();
        return
    }
    status++;
    selectionLog[status] = c;
    var b = -1;
    if (status <= b++) {
        cm.dispose()
    } else {
        if (status === b++) {
            if (cm.getMapId() == 932200200) {
                var a = cm.getEventManager("活动_跑旗赛7点");
                a.setProperty("Round" + cm.getPlayer().getName(), "0")
            } else {
                if (cm.getMapId() == 932200100) {
                    var a = cm.getEventManager("活动_跑旗赛9点");
                    a.setProperty("Round" + cm.getPlayer().getName(), "0")
                }
            }
            cm.dispose()
        } else {
            cm.dispose()
        }
    }
}

function start() {
    status = -1;
    action(1, 0, 0)
};